// Copyright(c) 2011 Matthew McMullan, Jorel Lalicki and Mike Heise, Jorel Lalicki and Mike Heise. See copying.txt for details.

#ifndef __agml_constants_h__
#define __agml_constants_h__

// make sure that this file is never included directly
#ifndef __agml_agml_h__
#error "Include AGML from agml.h only. This file is not a valid entry point for the library."
#endif

namespace agml {
	// these should be downcast to whatever is needed at compile time
	// pi and 2 pi
	Cf80 _pi = 3.14159265358979323846264338327950288;
	Cf80 _pi_2 = _pi / 2;
	Cf80 _2pi = 6.28318530717958647692528676666900576;
	// angle conversions d = degree, r = radian, g = gradian, h = hour, t = turn
	Cf80 _d2r = 0.01745329251994329576907684886127111;
	Cf80 _d2g = 400.0/360.0;
	Cf80 _d2h = 1.0/15.0;
	Cf80 _d2t = 1.0/360.0;
	Cf80 _r2d = 57.2957795130823208767981548141051704;
	Cf80 _r2g = 200.0/_pi;
	Cf80 _r2h = 12.0/_pi;
	Cf80 _r2t = 1.0/_2pi;
	Cf80 _g2d = 360.0/400.0;
	Cf80 _g2r = _pi/200.0;
	Cf80 _g2h = 24.0/400.0;
	Cf80 _g2t = 1.0/400.0;
	Cf80 _h2d = 30;
	Cf80 _h2r = _pi/12.0;
	Cf80 _h2g = 400.0/24.0;
	Cf80 _h2t = 1.0/24.0;
	Cf80 _t2d = 360.0/1.0;
	Cf80 _t2r = _2pi/1.0;
	Cf80 _t2g = 400.0/1.0;
	Cf80 _t2h = 24.0/1.0;
	// e
	Cf80 _e =   2.71828182845904523536028747135266249;
	// sqrt of some primes
	Cf80 _sqrt2 = 1.41421356237309504880168872420969807;
	Cf80 _sqrt3 = 1.73205080756887729352744634150587236;
	Cf80 _sqrt5 = 2.23606797749978969640917366873127623;

	// immaginary constant
	xi8 _i8i = xi8(0,1);
	xu8 _u8i = xu8(0,1);
	xi16 _i16i = xi16(0,1);
	xu16 _u16i = xu16(0,1);
	xi32 _i32i = xi32(0,1);
	xu32 _u32i = xu32(0,1);
	xf32 _f32i = xf32(0,1);
	xi64 _i64i = xi64(0,1);
	xu64 _u64i = xu64(0,1);
	xf64 _f64i = xf64(0,1);
	xf80 _f80i = xf80(0,1);
}

#endif
